#-*-perl-*-
use Test::More qw(no_plan);
use strict;
use warnings;
use lib '../lib';

use_ok 'AlienArena::Server::Bot';
my $bot = AlienArena::Server::Bot->new('Xlex');
isa_ok $bot, 'AlienArena::Server::Bot';
is $bot->name, 'Xlex', 'name field';
$bot->skin('martianenforcer');
$bot->skill(1);
$bot->team('blue');
is $bot->skill, 1, 'skill field';
is $bot->skin, 'martianenforcer', 'skin field';
is $bot->team, 'blue', 'team field';
$bot->add_taunt('%s: Confound it, %s!');
$bot->add_taunt('LOL');
is_deeply( [$bot->taunt_strings], ['%s: Confound it, %s!','LOL'], 'add and read taunts');
$bot->set_taunt_strings('Curses!','Hobknocker!');
is_deeply( [$bot->taunt_strings], ['Curses!','Hobknocker!'], 'set taunt string array');
is AlienArena::Server::Bot->weapon_from_index(6),'Rocket Launcher', 'weapon_from_index';
is AlienArena::Server::Bot->weapon_index('Rocket Launcher'), 6, 'weapon_index';


